From: Jasper St. Pierre Date: Thu, 22 Aug 2013 20:17:52 +0000 (-0400) Subject: endSessionDialog: Fix a warning X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~3642 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=77dc587686b8f46828371baa995a6019db0a8338;p=gnome-shell.git endSessionDialog: Fix a warning If _timerId is undefined/null, as it is by default, we will take this path, and fail when trying to remove a source ID for undefined. https://bugzilla.gnome.org/show_bug.cgi?id=706612 --- diff --git a/js/ui/endSessionDialog.js b/js/ui/endSessionDialog.js index c36f5532d..48ff151bf 100644 --- a/js/ui/endSessionDialog.js +++ b/js/ui/endSessionDialog.js @@ -442,7 +442,7 @@ const EndSessionDialog = new Lang.Class({ }, _stopTimer: function() { - if (this._timerId != 0) { + if (this._timerId > 0) { Mainloop.source_remove(this._timerId); this._timerId = 0; }